<?php 


	function payform_view($valid, $list, $order_id, $nickname, $return_url_success, $return_url_fail,$course_name ,$div, $str_payment_name ){
		//echo  json_encode($list) . "<br>";
		//echo  "valid $valid <br>";
		//echo $return_url_success ."<br>";
		//echo $return_url_fail ."<br>";
		//echo $course_name ."<br>";
				

?>
	<!--
	Аккаунт:  	<input id="order_id" name="order_id" type="text" value="<?php echo $order_id; ?>"><br/>
	-->
	
	

	<div id="closePaymentDivModal"> <span class="glyphicon glyphicon-remove"></span> </div>

	<script>
		jQuery(function(){
			jQuery("#closePaymentDivModal").click(function(){
				jQuery('#paymentDivModal').html('');
				jQuery('#paymentDivModalbg').hide();	
			});
		});

	</script>
	

	<br>
	<br>
	<br>
	
	<h3 class="h3">Выберите сумму оплаты:</h3>

	<br>
	<?php foreach($list as $key => $val){ ?>

		<!-- https://paymentgateway.ru/pgw/ -->
		<form id="pgw_paynemts" method="get" action="https://paymentgateway.ru/pgw/">
			<input type="hidden" id="project" name="project" value="<?php echo $val["projectid"]; ?>">
			<input id="order_id" name="order_id" type="hidden" value="<?php echo $order_id; ?>">
			<input id="amount" name="amount" type="hidden" value="<?php echo $val['amount']['value'];?>">
			<input id="nickname" name="nickname" type="hidden" value="<?php echo $str_payment_name;?>">
			<input class="tablePageButton payButton" id="pgw_payment_submit" type="submit" name="submit" value="<?php echo $val['amount']['key'] . " - " . $val['amount']['value']; ?>">
		</form>
	<?php } ?>

<?php 	}  ?>